package com.wn.system.controller;

import com.wn.system.service.impl.HelloServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ShowController {

    @GetMapping("/hello")
    public String hello(){
        return "hello world";
    }

    @GetMapping("/list")
    public String list(){
        return "hello world list";
    }


    @Autowired
    private HelloServiceImpl helloService;
    /**
     *   2 个入口 可以 通过   SentinelResource 这个设定资源
     *     进行流量控制
     * @return
     */
    @GetMapping("/check1")
    public String check(){
        return helloService.handlerBusiness();
    }
    @GetMapping("/check2")
    public String check1(){
        return helloService.handlerBusiness();
    }

}